<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('新增延期申请')" />
    <th:block th:include="include :: ztree-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-move-add">
        <div class="col-md-12">
            <div class="form-group">
                <label class="col-sm-3 control-label">申请转移的任务：</label>
                <div class="col-sm-9">
                    <input name="" class="form-control" type="text" th:value="${move.info.target}" disabled="disabled" />
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">申请人：</label>
                <div class="col-sm-9">
                    <input name="" class="form-control" type="text" th:value="${move.aUser.userName}" disabled="disabled" />
                </div>
                </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">申请时间：</label>
                <div class="col-sm-9">
                    <input name="" class="form-control" type="text" th:value="${#dates.format(move.cdate,'yyyy-MM-dd')}" disabled="disabled" />
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">移交人：</label>
                <div class="col-sm-9">
                    <input name="" class="form-control" type="text" th:value="${move.oUser.userName}" disabled="disabled" />
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">转移原因：</label>
                <div class="col-sm-9">
                    <textarea type="text" name="" class="form-control" placeholder="请输入文本" th:text="${move.reason}"></textarea>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">是否同意：</label>
                <div class="col-sm-9">
                    <input name="" class="form-control" type="text" th:if="${move.opinion}== 0" value="同意" disabled="disabled" />
                    <input name="" class="form-control" type="text" th:if="${move.opinion}== 1" value="不同意" disabled="disabled" />
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">审核人：</label>
                <div class="col-sm-9">
                    <input name="" class="form-control" type="text" th:value="${move.nextUser.userName}" disabled="disabled" />
                </div>
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: ztree-js" />
<script type="text/javascript">
    function submitHandler() {
        if ($.validate.form()) {
            add();
        }
    }
    function add() {
        var vals = $("#form-move-add").serialize();
        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "cms/mm/move/add",
            data : vals,
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>